package com.moss.cloud.base.api.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class ClientVO implements Serializable {
    public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
    private Long id;
    /** 客户端ID */
    private String clientId;
    /** 客户端状态（1:在线，2:下线） */
    private Integer clientStatus;
    /** 客户端名称 */
    private String clientName;
    /** 客户端说明 */
    private String clientDesc;
    private String createdBy;
    private String updatedBy;
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = DATE_FORMAT)
    private LocalDateTime createdTime;
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = DATE_FORMAT)
    private LocalDateTime updatedTime;
    /**重定向URI*/
    private String webServerRedirectUri;
    /**访问令牌有效时间值(单位:秒)*/
    private Integer accessTokenValidity;
    /**更新令牌有效时间值(单位:秒)*/
    private Integer refreshTokenValidity;
    /**客户端申请的权限范围*/
    private String scope;
    /**客户端支持的grant_type*/
    private String authorizedGrantTypes;
    /**客户端申请的权限范围*/
    private List<String> scopeList;
    /**客户端支持的grant_type*/
    private List<String> authorizedGrantTypesList;
}
